﻿const RouteWatcher = '@/components/antd-pro-page-tabs/RouteWatcher';

export default [
  {
    path: '/',
    component: '../layouts/BlankLayout',
    routes: [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          {
            path: '/user/login',
            name: 'login',
            component: './User/login',
          },
          {
            path: '/user',
            redirect: '/user/login',
          },
          {
            name: 'register-result',
            icon: 'smile',
            path: '/user/register-result',
            component: './user/register-result',
          },
          {
            name: 'register',
            icon: 'smile',
            path: '/user/register',
            component: './user/register',
          },
          {
            component: '404',
          },
        ],
      },
      {
        path: '/',
        component: '../layouts/SecurityBasicLayout',
        Routes: ['src/pages/Authorized'],
        routes: [
          {
            path: '/',
            redirect: '/dashboard/analysis',
          },
          {
            name: 'dashboard',
            path: '/dashboard',
            icon: 'dashboard',
            routes: [
              {
                path: '/',
                redirect: '/dashboard/analysis',
              },
              {
                name: 'analysis',
                title: 'menu.title.analysis',
                icon: 'smile',
                path: '/dashboard/analysis',
                component: './dashboard/analysis',
                wrappers: [RouteWatcher],
              },
              {
                name: 'monitor',
                title: 'menu.title.monitor',
                icon: 'dashboard',
                path: '/dashboard/monitor',
                component: './dashboard/monitor',
                wrappers: [RouteWatcher],
              },
              {
                name: 'workplace',
                title: 'menu.title.workplace',
                icon: 'home',
                path: '/dashboard/workplace',
                component: './dashboard/workplace',
                wrappers: [RouteWatcher],
              },
            ],
          },                      
          {
            name: 'account',
            path: '/account',
            icon: 'user',
            routes: [
              {
                path: '/',
                redirect: '/account/center',
              },
              {
                name: 'center',
                title: 'menu.title.account.center',
                icon: 'user',
                path: '/account/center',
                component: './account/center',
                wrappers: [RouteWatcher],
              },
              {
                name: 'settings',
                title: 'menu.title.account.settings',
                icon: 'settings',
                path: '/account/settings',
                component: './account/settings',
                wrappers: [RouteWatcher],
              },
            ],
          },
          {
            name: 'system',
            icon: 'BugOutlined',
            path: '/system',
            routes: [
              {
                path: '/',
                redirect: '/system/user',
              },
              {
                name: 'user',
                title: 'menu.title.user',
                icon: 'PartitionOutlined',
                path: '/system/user',
                component: 'system/user/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'menu',
                title: 'menu.title.menu',
                icon: 'PartitionOutlined',
                path: '/system/menu',
                component: 'system/menu/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'role',
                title: 'menu.title.role',
                icon: 'PartitionOutlined',
                path: '/system/role',
                component: 'system/role/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'dept',
                title: 'menu.title.dept',
                icon: 'PartitionOutlined',
                path: '/system/dept',
                component: 'system/dept/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'post',
                title: 'menu.title.post',
                icon: 'PartitionOutlined',
                path: '/system/post',
                component: 'system/post/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'dict',
                title: 'menu.title.dict',
                icon: 'PartitionOutlined',
                path: '/system/dict',
                component: 'system/dict/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'dictData',
                title: 'menu.title.dictData',
                icon: 'PartitionOutlined',
                path: '/system/dict-data/index/:id?',
                component: 'system/dictData/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'config',
                title: 'menu.title.config',
                icon: 'PartitionOutlined',
                path: '/system/config',
                component: 'system/config/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'notice',
                title: 'menu.title.notice',
                icon: 'PartitionOutlined',
                path: '/system/notice',
                component: 'system/notice/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'log',
                icon: 'BugOutlined',
                path: '/system/log/',
                routes: [
                  {
                    path: '/',
                    redirect: '/system/log/operlog',
                  },
                  {
                    name: 'operlog',
                    title: 'menu.title.operlog',
                    icon: 'PartitionOutlined',
                    path: '/system/log/operlog',
                    component: 'monitor/operlog',
                    wrappers: [RouteWatcher],
                  },
                  {
                    name: 'loginInfo',
                    title: 'menu.title.loginInfo',
                    icon: 'PartitionOutlined',
                    path: '/system/log/logininfor',
                    component: 'monitor/logininfor',
                    wrappers: [RouteWatcher],
                  },
                ],
              },
            ],
          },
          {
            name: 'monitor',
            icon: 'BugOutlined',
            path: '/monitor',
            routes: [
              {
                path: '/',
                redirect: '/monitor/online',
              },
              {
                name: 'onlineUser',
                title: 'menu.title.onlineUser',
                icon: 'PartitionOutlined',
                path: '/monitor/online',
                component: 'monitor/online',
                wrappers: [RouteWatcher],
              },
              {
                name: 'job',
                title: 'menu.title.job',
                icon: 'PartitionOutlined',
                path: '/monitor/job',
                component: 'monitor/job',
                wrappers: [RouteWatcher],
              },
              {
                name: 'joblog',
                title: 'menu.title.joblog',
                icon: 'PartitionOutlined',
                path: '/monitor/job-log/index/:jobId?',
                component: 'monitor/joblog',
                wrappers: [RouteWatcher],
              },
              {
                name: 'druid',
                title: 'menu.title.druid',
                icon: 'PartitionOutlined',
                path: '/monitor/druid',
                component: 'monitor/druid',
                wrappers: [RouteWatcher],
              },
              {
                name: 'serverInfo',
                title: 'menu.title.serverInfo',
                icon: 'PartitionOutlined',
                path: '/monitor/server',
                component: 'monitor/server',
                wrappers: [RouteWatcher],
              },
              {
                name: 'cacheInfo',
                title: 'menu.title.cacheInfo',
                icon: 'PartitionOutlined',
                path: '/monitor/cache',
                component: 'monitor/cache',
                wrappers: [RouteWatcher],
              },
            ],
          },
          {
            name: 'tool',
            icon: 'BugOutlined',
            path: '/tool',
            routes: [
              {
                path: '/',
                redirect: '/tool/gen',
              },
              {
                name: 'gen',
                title: 'menu.title.gen',
                icon: 'PartitionOutlined',
                path: '/tool/gen',
                component: 'tool/gen/index',
                wrappers: [RouteWatcher],
              },
              {
                name: 'design',
                title: 'menu.title.design',
                icon: 'PartitionOutlined',
                path: '/tool/design',
                component: 'tool/design',
                wrappers: [RouteWatcher],
              },
              {
                name: 'swagger',
                title: 'menu.title.swagger',
                icon: 'PartitionOutlined',
                path: '/tool/swagger',
                component: 'tool/swagger',
                wrappers: [RouteWatcher],
              },
            ],
          },
          {
            path: '/form',
            icon: 'form',
            name: 'form',
            routes: [
              {
                path: '/',
                redirect: '/form/basic-form',
              },
              {
                name: 'basic-form',
                icon: 'smile',
                path: '/form/basic-form',
                component: './form/basic-form',
              },
              {
                name: 'step-form',
                icon: 'smile',
                path: '/form/step-form',
                component: './form/step-form',
              },
              {
                name: 'advanced-form',
                icon: 'smile',
                path: '/form/advanced-form',
                component: './form/advanced-form',
              },
            ],
          },
          {
            path: '/list',
            icon: 'table',
            name: 'list',
            routes: [
              {
                path: '/list/search',
                name: 'search-list',
                component: './list/search',
                routes: [
                  {
                    path: '/list/search',
                    redirect: '/list/search/articles',
                  },
                  {
                    name: 'articles',
                    icon: 'smile',
                    path: '/list/search/articles',
                    component: './list/search/articles',
                  },
                  {
                    name: 'projects',
                    icon: 'smile',
                    path: '/list/search/projects',
                    component: './list/search/projects',
                  },
                  {
                    name: 'applications',
                    icon: 'smile',
                    path: '/list/search/applications',
                    component: './list/search/applications',
                  },
                ],
              },
              {
                path: '/',
                redirect: '/list/table-list',
              },
              {
                name: 'table-list',
                icon: 'smile',
                path: '/list/table-list',
                component: './list/table-list',
              },
              {
                name: 'basic-list',
                icon: 'smile',
                path: '/list/basic-list',
                component: './list/basic-list',
              },
              {
                name: 'card-list',
                icon: 'smile',
                path: '/list/card-list',
                component: './list/card-list',
              },
            ],
          },
          {
            path: '/profile',
            name: 'profile',
            icon: 'profile',
            routes: [
              {
                path: '/',
                redirect: '/profile/basic',
              },
              {
                name: 'basic',
                icon: 'smile',
                path: '/profile/basic',
                component: './profile/basic',
              },
              {
                name: 'advanced',
                icon: 'smile',
                path: '/profile/advanced',
                component: './profile/advanced',
              },
            ],
          },
          {
            name: 'result',
            icon: 'CheckCircleOutlined',
            path: '/result',
            routes: [
              {
                path: '/',
                redirect: '/result/success',
              },
              {
                name: 'success',
                icon: 'smile',
                path: '/result/success',
                component: './result/success',
              },
              {
                name: 'fail',
                icon: 'smile',
                path: '/result/fail',
                component: './result/fail',
              },
            ],
          },
          {
            name: 'exception',
            icon: 'warning',
            path: '/exception',
            routes: [
              {
                path: '/',
                redirect: '/exception/403',
              },
              {
                name: '403',
                icon: 'smile',
                path: '/exception/403',
                component: './exception/403',
              },
              {
                name: '404',
                icon: 'smile',
                path: '/exception/404',
                component: './exception/404',
              },
              {
                name: '500',
                icon: 'smile',
                path: '/exception/500',
                component: './exception/500',
              },
            ],
          },
          {
            name: 'editor',
            icon: 'highlight',
            path: '/editor',
            routes: [
              {
                path: '/',
                redirect: '/editor/flow',
              },
              {
                name: 'flow',
                icon: 'smile',
                path: '/editor/flow',
                component: './editor/flow',
              },
              {
                name: 'mind',
                icon: 'smile',
                path: '/editor/mind',
                component: './editor/mind',
              },
              {
                name: 'koni',
                icon: 'smile',
                path: '/editor/koni',
                component: './editor/koni',
              },
            ],
          },
          {
            component: '404',
          },
        ],
      },
    ],
  },
];
